home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  4.1 KB  |  159 lines

  1. /*  time.h
  2.  
  3.     Struct and function declarations for dealing with time.
  4.  
  5. */
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 9.0
  9.  *
  10.  *      Copyright (c) 1987, 1998 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14. /* $Revision:   9.6  $ */
  15.  
  16. #ifndef __TIME_H
  17. #define __TIME_H
  18. #define _INC_TIME  /* MSC Guard name */
  19.  
  20. #ifndef ___STDDEF_H
  21. #include <_stddef.h>
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. namespace std {
  26. #endif /* __cplusplus */
  27.  
  28. #if !defined(RC_INVOKED)
  29.  
  30. #if defined(__STDC__)
  31. #pragma warn -nak
  32. #endif
  33.  
  34. #pragma pack(push, 1)
  35.  
  36. #endif  /* !RC_INVOKED */
  37.  
  38.  
  39. #ifndef  _TIME_T
  40. typedef long time_t;
  41. #ifdef __cplusplus
  42. #  define _TIME_T std::time_t
  43. #else
  44. #  define _TIME_T time_t
  45. #endif /* __cplusplus */
  46. #endif
  47.  
  48. #ifndef  _CLOCK_T
  49. #define  _CLOCK_T
  50. typedef long clock_t;
  51. #endif
  52.  
  53. #define CLOCKS_PER_SEC 1000.0
  54. #define CLK_TCK        1000.0
  55.  
  56. struct tm
  57. {
  58.   int   tm_sec;
  59.   int   tm_min;
  60.   int   tm_hour;
  61.   int   tm_mday;
  62.   int   tm_mon;
  63.   int   tm_year;
  64.   int   tm_wday;
  65.   int   tm_yday;
  66.   int   tm_isdst;
  67. };
  68.  
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. char _FAR * _RTLENTRY _EXPFUNC   asctime(const struct tm _FAR *__tblock);
  73. char _FAR * _RTLENTRY _EXPFUNC   ctime(const time_t _FAR *__time);
  74. double      _RTLENTRY _EXPFUNC32 difftime(time_t __time2, time_t __time1);
  75. struct tm _FAR * _RTLENTRY _EXPFUNC gmtime(const time_t _FAR *__timer);
  76. struct tm _FAR * _RTLENTRY _EXPFUNC localtime(const time_t _FAR *__timer);
  77. time_t      _RTLENTRY _EXPFUNC32 time(time_t _FAR *__timer);
  78. time_t      _RTLENTRY _EXPFUNC   mktime(struct tm _FAR *__timeptr);
  79. clock_t     _RTLENTRY _EXPFUNC32 clock(void);
  80. _SIZE_T      _RTLENTRY _EXPFUNC   strftime(char _FAR *__s, _SIZE_T __maxsize,
  81.                                           const char _FAR *__fmt, const struct tm _FAR *__t);
  82. _SIZE_T      _RTLENTRY _EXPFUNC   _lstrftim(char _FAR *__s, _SIZE_T __maxsize,
  83.                                             const char _FAR *__fmt, const struct tm _FAR *__t);
  84. wchar_t   * _RTLENTRY _EXPFUNC   _wasctime(const struct tm *__tblock);
  85. wchar_t   * _RTLENTRY _EXPFUNC   _wctime(const time_t *__time);
  86. wchar_t   * _RTLENTRY _EXPFUNC   _wstrdate(wchar_t *__datestr);
  87. wchar_t   * _RTLENTRY _EXPFUNC   _wstrtime(wchar_t *__timestr);
  88. _SIZE_T      _RTLENTRY _EXPFUNC   wcsftime(wchar_t *__s, _SIZE_T __maxsize,
  89.                                           const wchar_t *__fmt, const struct tm *__t);
  90. void        _RTLENTRY  _EXPFUNC  _wtzset(void);
  91.  
  92. extern int               _RTLENTRY _EXPDATA _daylight;
  93. extern long              _RTLENTRY _EXPDATA _timezone;
  94. extern char _FAR * const _RTLENTRY _EXPDATA _tzname[2];
  95. extern wchar_t   * const _RTLENTRY _EXPDATA _wtzname[2];
  96.  
  97. int         _RTLENTRY           stime(time_t _FAR *__tp);
  98. void        _RTLENTRY  _EXPFUNC _tzset(void);
  99. char _FAR * _RTLENTRY  _EXPFUNC _strdate(char _FAR *__datestr);
  100. char _FAR * _RTLENTRY  _EXPFUNC _strtime(char _FAR *__timestr);
  101.  
  102. #if !defined(__STDC__)
  103. void        _RTLENTRY  _EXPFUNC tzset(void);
  104. #endif  /* __STDC__  */
  105.  
  106. #ifdef __cplusplus
  107. }
  108. #endif
  109.  
  110.  
  111. #if !defined(RC_INVOKED)
  112.  
  113. /* restore default packing */
  114. #pragma pack(pop)
  115.  
  116. #if defined(__STDC__)
  117. #pragma warn .nak
  118. #endif
  119.  
  120. #endif  /* !RC_INVOKED */
  121.  
  122. #ifdef __cplusplus
  123. } // std
  124. #  ifndef __USING_CNAME__
  125.      using std::time_t;
  126.      using std::clock_t;
  127.      using std::tm;
  128.      using std::asctime;
  129.      using std::ctime;
  130.      using std::difftime;
  131.      using std::gmtime;
  132.      using std::localtime;
  133.      using std::time;
  134.      using std::mktime;
  135.      using std::clock;
  136.      using std::strftime;
  137.      using std::_lstrftim;
  138.      using std::_wasctime;
  139.      using std::_wctime;
  140.      using std::_wstrdate;
  141.      using std::_wstrtime;
  142.      using std::wcsftime;
  143.      using std::_wtzset;
  144.      using std::stime;
  145.      using std::_tzset;
  146.      using std::_strdate;
  147.      using std::_strtime;
  148.      using std::_daylight;
  149.      using std::_timezone;
  150.      using std::_tzname;
  151.      using std::_wtzname;
  152. #if !defined(__STDC__)
  153.      using std::tzset;
  154. #endif
  155. #  endif // __USING_CNAME__
  156. #endif /* __cplusplus */
  157.  
  158. #endif  /* __TIME_H */
  159.